package org.hardcode.rpc.annotation;

import org.springframework.stereotype.Component;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 服务提供者注解
 * 例子
 * @RpcService(interfaceClass=HardCodeService.class,version="1.0.0",group="hardcode")
 * public class HardCodeServiceImpl implements  HardCodeService{
 *
 * }
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Component
public @interface RpcService {

    //接口的class
    Class<?> interfaceClass() default  void.class;
    //接口的ClassName
    String interfaceClassName() default  "";
    //版本号
    String version() default "1.0.0";

    //服务分组  默认为空
    String group()  default "";
}
